<html>
<head><meta charset="utf-8"><title>equality variant vs polonius-as-is · t-compiler/wg-polonius · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/index.html">t-compiler/wg-polonius</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html">equality variant vs polonius-as-is</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205802020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205802020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205802020">(Aug 03 2020 at 14:43)</a>:</h4>
<p>this one is important with respect to users</p>



<a name="205802048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205802048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205802048">(Aug 03 2020 at 14:43)</a>:</h4>
<p>(side note that it feels like it wants to use union-set in the ultimate impl...)</p>



<a name="205813749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205813749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205813749">(Aug 03 2020 at 16:13)</a>:</h4>
<p>I had this old implementation of the equality rules <a href="https://github.com/lqd/borrow-check/tree/variant_prototype2">https://github.com/lqd/borrow-check/tree/variant_prototype2</a> which was my last look at the rules. I remember I had to add another TC of the equality tuples compared to just propagating them as mentioned on the issue, as they were missing an error in one of our examples. I rambled the analysis and fix, in this other topic starting <a href="#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/equality.20regions/near/177797983">here</a> which ends with the rustc test cases with unexpected results: 2 cases which shouldn't be compiling but do so with the prototype</p>



<a name="205814006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205814006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205814006">(Aug 03 2020 at 16:16)</a>:</h4>
<p>OK</p>



<a name="205814114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205814114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205814114">(Aug 03 2020 at 16:16)</a>:</h4>
<p>let me try to catch up here, I feel like this is the most interesting unknown <em>at present</em>, right?</p>



<a name="205814180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205814180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205814180">(Aug 03 2020 at 16:17)</a>:</h4>
<p>(not sure btw if you following along with what <span class="user-mention" data-user-id="204115">@Albin Stjerna</span> and I were saying in <a class="stream-topic" data-stream-id="186049" href="/#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/move.20error.20reporting">#t-compiler/wg-polonius &gt; move error reporting</a>, it looks like we could speed that up somewhat while also getting the error reporting that rustc wants...)</p>



<a name="205814379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205814379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205814379">(Aug 03 2020 at 16:19)</a>:</h4>
<p>(I was not entirely following but that's great to hear !)</p>



<a name="205814426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205814426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205814426">(Aug 03 2020 at 16:19)</a>:</h4>
<p>it feels like a very interesting unknown indeed</p>



<a name="205814536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205814536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205814536">(Aug 03 2020 at 16:20)</a>:</h4>
<p>and one that at least you wouldn't "waste" your precious little time on updating hackmd rules that I can do in the meantime :)</p>



<a name="205814859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205814859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205814859">(Aug 03 2020 at 16:23)</a>:</h4>
<p>I'm looking at the two test cases you cited in the "ramble"</p>



<a name="205815079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205815079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205815079">(Aug 03 2020 at 16:25)</a>:</h4>
<p>:) rambling-as-a-service</p>



<a name="205815662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205815662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205815662">(Aug 03 2020 at 16:30)</a>:</h4>
<p>So I want to try and reproduce this case: <a href="https://github.com/rust-lang/rust/blob/master/src/test/ui/nll/promoted-bounds.rs">https://github.com/rust-lang/rust/blob/master/src/test/ui/nll/promoted-bounds.rs</a></p>



<a name="205815873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205815873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205815873">(Aug 03 2020 at 16:32)</a>:</h4>
<p>off the top of my head, I can't see why it would not get an error. I expect that we would force <code>c</code> to be <code>{Lb, La}</code> (where those are loans from <code>&amp;l</code> and <code>&amp;5</code> repsectively)</p>



<a name="205815944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205815944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205815944">(Aug 03 2020 at 16:32)</a>:</h4>
<p>and hence we should get an error when we leave the scope of <code>{...}</code> that block because of some statement like <code>STORAGE_DEAD(l)</code></p>



<a name="205815993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205815993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205815993">(Aug 03 2020 at 16:33)</a>:</h4>
<p>in order for me to do that, <span class="user-mention" data-user-id="116113">@lqd</span>, do I have to build a rustc that links against your branch? Or can I just generate the facts I guess?</p>



<a name="205816182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205816182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205816182">(Aug 03 2020 at 16:34)</a>:</h4>
<p>oh sorry I don't remember if I had pushed it, let me check (I tend not to do so)</p>



<a name="205816287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205816287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205816287">(Aug 03 2020 at 16:35)</a>:</h4>
<p>(since it's an old polonius branch, generating new facts wouldn't work either, after the relations have been renamed and so on)</p>



<a name="205816333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205816333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205816333">(Aug 03 2020 at 16:35)</a>:</h4>
<p>ok, maybe a worthwhile experiment would be to try and "rebase"</p>



<a name="205816341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205816341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205816341">(Aug 03 2020 at 16:36)</a>:</h4>
<p>but I think your dedicated half day for the sprint is close to ending ?</p>



<a name="205816412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205816412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205816412">(Aug 03 2020 at 16:36)</a>:</h4>
<p>if so, I can prepare both the rustc branch and polonius rebased prototype later today</p>



<a name="205816526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205816526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205816526">(Aug 03 2020 at 16:37)</a>:</h4>
<p>yeah, I've got to go, I've got a bit more time -- I might pop back in later and do a few more things, not sure yet</p>



<a name="205816554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205816554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205816554">(Aug 03 2020 at 16:37)</a>:</h4>
<p>if nothing else though I have to attend the lang-team meeting in a few hours :)</p>



<a name="205817197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205817197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205817197">(Aug 03 2020 at 16:42)</a>:</h4>
<p>alright I will start preparing these 2</p>



<a name="205817265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205817265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205817265">(Aug 03 2020 at 16:43)</a>:</h4>
<p>it's more important / useful than the OOM fixes, and we can talk a bit about those later in the sprint</p>



<a name="205821490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205821490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205821490">(Aug 03 2020 at 17:16)</a>:</h4>
<p>I agree, this is probably the biggest unknown</p>



<a name="205839188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205839188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205839188">(Aug 03 2020 at 19:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> alright I've finished rebasing and adding subset errors to the prototype <a href="https://github.com/lqd/borrow-check/tree/variant_prototype3">https://github.com/lqd/borrow-check/tree/variant_prototype3</a></p>



<a name="205839402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205839402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205839402">(Aug 03 2020 at 19:50)</a>:</h4>
<p>did you want to run rustc's tests with it or just the one example from earlier ? if it's the former I can push a rustc branch to make it easier to test</p>



<a name="205839441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205839441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205839441">(Aug 03 2020 at 19:50)</a>:</h4>
<p>otherwise any recent nightly's facts would work</p>



<a name="205841366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205841366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205841366">(Aug 03 2020 at 20:07)</a>:</h4>
<p>here is the rustc branch for easy testing if need be <a href="https://github.com/lqd/rust/tree/equality_prototype">https://github.com/lqd/rust/tree/equality_prototype</a></p>



<a name="205842747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205842747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205842747">(Aug 03 2020 at 20:21)</a>:</h4>
<p>ooh, nice</p>



<a name="205843373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205843373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205843373">(Aug 03 2020 at 20:26)</a>:</h4>
<p>most of the variant was generated by datapond so it's definitely, absolutely, not at all efficient. For example, equal origins are still present in <code>subsets</code> which will take some deduping at the end of each round, and so on, but that shouldn't matter for our tests at least</p>



<a name="205843911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205843911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205843911">(Aug 03 2020 at 20:31)</a>:</h4>
<p>output on promoted-bounds:</p>
<div class="codehilite"><pre><span></span><code>$ cargo run -q -- ./inputs/promoted-bounds/nll-facts/main/ --show-tuples -a naive &amp;&amp; cargo run -q -- ./inputs/promoted-bounds/nll-facts/main/ --show-tuples -a prototype
--------------------------------------------------
Directory: ./inputs/promoted-bounds/nll-facts/main/
Time: 0.061s
# errors
errors &quot;Start(bb2[7])&quot; &quot;bw0&quot;
# move_errors
# subset_errors
--------------------------------------------------
Directory: ./inputs/promoted-bounds/nll-facts/main/
Time: 0.064s
# errors
# move_errors
# subset_errors
</code></pre></div>



<a name="205855363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205855363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205855363">(Aug 03 2020 at 22:36)</a>:</h4>
<p>you didn't check in the promoted-bounds inputs, right?</p>



<a name="205855366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205855366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205855366">(Aug 03 2020 at 22:36)</a>:</h4>
<p>I don't see them, anyway</p>



<a name="205855376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205855376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205855376">(Aug 03 2020 at 22:36)</a>:</h4>
<p>no but I can do so</p>



<a name="205855387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205855387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205855387">(Aug 03 2020 at 22:36)</a>:</h4>
<p>just a sec</p>



<a name="205855518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205855518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205855518">(Aug 03 2020 at 22:38)</a>:</h4>
<p>it's ok, I generated them</p>



<a name="205855529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205855529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205855529">(Aug 03 2020 at 22:38)</a>:</h4>
<p>I see the output now</p>



<a name="205855647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205855647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205855647">(Aug 03 2020 at 22:40)</a>:</h4>
<p>ah ok</p>



<a name="205855666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205855666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205855666">(Aug 03 2020 at 22:40)</a>:</h4>
<p>I was just about to push</p>



<a name="205856992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205856992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205856992">(Aug 03 2020 at 22:59)</a>:</h4>
<p>I'm trying to remember what kind of debug output there is</p>



<a name="205857004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205857004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205857004">(Aug 03 2020 at 22:59)</a>:</h4>
<p>e.g., I guess I can't readily get a graphviz of the cfg?</p>



<a name="205857127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205857127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205857127">(Aug 03 2020 at 23:00)</a>:</h4>
<p>you can IIRC</p>



<a name="205857183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205857183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205857183">(Aug 03 2020 at 23:01)</a>:</h4>
<p>probably <code>--graphviz-file somefile.dot</code></p>



<a name="205857229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205857229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205857229">(Aug 03 2020 at 23:01)</a>:</h4>
<p>it will have some facts so it's not just the cfg</p>



<a name="205857462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205857462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205857462">(Aug 03 2020 at 23:04)</a>:</h4>
<p>yeah</p>



<a name="205857465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205857465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205857465">(Aug 03 2020 at 23:04)</a>:</h4>
<p>useful maybe</p>



<a name="205857517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205857517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205857517">(Aug 03 2020 at 23:05)</a>:</h4>
<p>they can easily be removed to just leave the cfg IIRC</p>



<a name="205857853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205857853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205857853">(Aug 03 2020 at 23:11)</a>:</h4>
<p>(last time I rambled while debugging I also had to add the equality tuples to the graphviz output)</p>



<a name="205861731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205861731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205861731">(Aug 04 2020 at 00:18)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> I realize I might be a bit confused -- the <code>promoted-boudns</code> test. With naive, at least, it generates an error--- like it's supposed to, right?</p>



<a name="205861754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205861754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205861754">(Aug 04 2020 at 00:18)</a>:</h4>
<p><em>oh</em>, I have to run with <code>Prototype</code>...</p>



<a name="205861763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205861763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205861763">(Aug 04 2020 at 00:18)</a>:</h4>
<p>right :)</p>



<a name="205861802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205861802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205861802">(Aug 04 2020 at 00:19)</a>:</h4>
<p>that part of the command line was scrolled out on my earlier output</p>



<a name="205863867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205863867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205863867">(Aug 04 2020 at 01:04)</a>:</h4>
<p>ok, so, digging a bit ...</p>



<a name="205863873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205863873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205863873">(Aug 04 2020 at 01:04)</a>:</h4>
<p>at bb0[22]</p>



<a name="205863883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205863883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205863883">(Aug 04 2020 at 01:04)</a>:</h4>
<p>we have <code> _8 = move _9(move _10, move _11) -&gt; [return: bb2, unwind: bb1];</code></p>



<a name="205863902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205863902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205863902">(Aug 04 2020 at 01:05)</a>:</h4>
<div class="codehilite"><pre><span></span><code>    let _8: &amp;&#39;_#70r i32;
    let mut _9: fn(&amp;&#39;_#71r i32, &amp;&#39;_#72r i32) -&gt; &amp;&#39;_#73r i32 {shorten_lifetime::&lt;&#39;_#71r, &#39;_#72r, &#39;_#73r&gt;}; // in scope 0 at promoted-bounds.rs:20:17: 20:37
    let mut _10: &amp;&#39;_#74r i32;            // in scope 0 at promoted-bounds.rs:20:38: 20:39
    let mut _11: &amp;&#39;_#75r i32;            // in scope 0 at promoted-bounds.rs:20:41: 20:42
</code></pre></div>



<a name="205863921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205863921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205863921">(Aug 04 2020 at 01:05)</a>:</h4>
<p>but</p>



<a name="205863928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205863928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205863928">(Aug 04 2020 at 01:05)</a>:</h4>
<div class="codehilite"><pre><span></span><code>outlives(&quot;\&#39;_#73r&quot;, &quot;\&#39;_#70r&quot;, _)
outlives(&quot;\&#39;_#74r&quot;, &quot;\&#39;_#71r&quot;, _)
outlives(&quot;\&#39;_#75r&quot;, &quot;\&#39;_#72r&quot;, _)
</code></pre></div>



<a name="205863981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205863981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205863981">(Aug 04 2020 at 01:06)</a>:</h4>
<p>there seems to be missing a relationship between 71, 72, and 73</p>



<a name="205863994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205863994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205863994">(Aug 04 2020 at 01:06)</a>:</h4>
<p>that would've been established by the where clauses on <code>_9</code></p>



<a name="205864004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205864004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205864004">(Aug 04 2020 at 01:06)</a>:</h4>
<p>i.e., for the type to be well-formed</p>



<a name="205864013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205864013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205864013">(Aug 04 2020 at 01:07)</a>:</h4>
<p>I'm not 100% sure where that would be checked</p>



<a name="205879724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205879724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205879724">(Aug 04 2020 at 07:28)</a>:</h4>
<p>that's very interesting</p>



<a name="205880135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205880135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205880135">(Aug 04 2020 at 07:36)</a>:</h4>
<p><del>both that it can show a problem in fact generation, and that the Naive variant is able to overcome it <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></del> maybe not, at least I think the relationship would show up in facts if it was a direct call and not via a function pointer, where the relationship would be discovered during the computation</p>



<a name="205881475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205881475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205881475">(Aug 04 2020 at 08:00)</a>:</h4>
<p>ah if you use a direct call, the prototype variant does indeed find the error</p>



<a name="205882453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205882453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205882453">(Aug 04 2020 at 08:14)</a>:</h4>
<p>I think NLLs would work similarly on this relationship, that is 71 &lt;: 73, 72 &lt;: 73 follow via <code>_31</code> (<code>let mut _31: &amp;'_#104r fn(&amp;'_#105r i32, &amp;'_#106r i32) -&gt; &amp;'_#107r i32</code>) with 71 &lt;: 105 &lt;: 107 &lt;: 73 and 72 &lt;: 106 &lt;: 107 &lt;: 73 (with some intermediate origins from <code>_1</code>removed)</p>



<a name="205883251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205883251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205883251">(Aug 04 2020 at 08:27)</a>:</h4>
<p>it's not as clear in the facts as it is in the MIR <span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span> I'm not seeing the <code>outlves</code> facts involving 71 or 72 we'd expect from the MIR, and that is probably what you meant all along</p>



<a name="205887516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205887516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205887516">(Aug 04 2020 at 09:30)</a>:</h4>
<p>these facts are super confusing, it's like the regions have different names</p>



<a name="205887926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205887926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205887926">(Aug 04 2020 at 09:36)</a>:</h4>
<p>going by the subset graph shape, I think we have <code>71 &lt;: 61 &lt;: 105</code> showing up as <code>77 &lt;: 67 &lt;: 115</code></p>



<a name="205888320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205888320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205888320">(Aug 04 2020 at 09:42)</a>:</h4>
<p>ok I might be starting to get a hunch for what the problem is</p>



<a name="205888779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205888779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205888779">(Aug 04 2020 at 09:49)</a>:</h4>
<p>the regions <em>are</em> indeed confusing but my hunch is this</p>



<a name="205888817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205888817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205888817">(Aug 04 2020 at 09:49)</a>:</h4>
<p>(side note that the proliferation of intermediate regions and so forth is probably kind of painful for polonius, it's exactly what the opt variants were trying to help... i.e., avoid propagating loan regions along every subset edge...)</p>



<a name="205888911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205888911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205888911">(Aug 04 2020 at 09:50)</a>:</h4>
<p>anyway my <em>hunch</em> is that, somewhere, we <em>are</em> enforcing the relationship between 71, 72, and 73 -- but we're establishing it once and then expecting it to remain true, but the whole idea of this variant was that we don't have to do that</p>



<a name="205888928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205888928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205888928">(Aug 04 2020 at 09:50)</a>:</h4>
<p>this example seems to suggest that this idea is wrong, that at least <em>sometimes</em> we do need to carry subset relations forward</p>



<a name="205888938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205888938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205888938">(Aug 04 2020 at 09:51)</a>:</h4>
<p>I'm trying to wrap my head around it :)</p>



<a name="205888953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205888953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205888953">(Aug 04 2020 at 09:51)</a>:</h4>
<p>I remember having this feeling that the notion of carrying equality constraints forward also kind of felt like a hack</p>



<a name="205888976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205888976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205888976">(Aug 04 2020 at 09:51)</a>:</h4>
<p>i.e., that there is a deeper distinction between 'momentary' relations and 'permanent' relations</p>



<a name="205889044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205889044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205889044">(Aug 04 2020 at 09:52)</a>:</h4>
<p>the latter coming about effectively when you create two kind of distinct aliases, and you need to keep a relationship between the parts</p>



<a name="205889456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205889456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205889456">(Aug 04 2020 at 09:58)</a>:</h4>
<p>or maybe I'm looking at this wrong</p>



<a name="205889511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205889511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205889511">(Aug 04 2020 at 09:59)</a>:</h4>
<p>maybe the problem is not that the subset relation <em>should've</em> propagated forward, so much as that we are not enforcing that the type is well-formed at the location or something like that</p>



<a name="205889534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205889534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205889534">(Aug 04 2020 at 09:59)</a>:</h4>
<p>gonna have to go and come back later though :)</p>



<a name="205890151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205890151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205890151">(Aug 04 2020 at 10:09)</a>:</h4>
<p>the example as given doesn't show it, but something I'm thinking about is this variant:</p>
<div class="codehilite"><pre><span></span><code><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">promoted_fn_item_ref</span>: <span class="nc">fn</span><span class="p">(</span><span class="n">_</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">shorten_lifetime</span><span class="p">;</span><span class="w"></span>
</code></pre></div>



<a name="205890168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205890168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205890168">(Aug 04 2020 at 10:09)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=c9d4058a68c306b75008b65b28d6f0da">playground</a></p>



<a name="205890241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205890241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205890241">(Aug 04 2020 at 10:10)</a>:</h4>
<p>it's interesting because the <code>_</code> are going to be instantiated to various <code>&amp;'X i32</code>, <code>&amp;'Y i32</code>, and <code>&amp;'Z i32</code>, and there has to be a relationship between X, Y, and Z that persists</p>



<a name="205890249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205890249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205890249">(Aug 04 2020 at 10:10)</a>:</h4>
<p>but that relationship doesn't come from the <code>fn</code> type itself, it comes from the <code>shorten_lifetime</code> type</p>



<a name="205890290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205890290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205890290">(Aug 04 2020 at 10:11)</a>:</h4>
<p>this makes me think that the equality variant as written is sort of flawed indeed, that there <em>is</em> a concept of "transient" subset relationships that are only enforced at a particular point, but it's more subtle than I was giving credit to</p>



<a name="205890556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205890556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205890556">(Aug 04 2020 at 10:15)</a>:</h4>
<p>it's pretty subtle and kinda hard to wrap my head around in conversation, without focusing hard on the equality propagation rules for each example</p>



<a name="205904172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205904172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205904172">(Aug 04 2020 at 13:13)</a>:</h4>
<p>I think my take-away here is that the equality variant is kind of incorrect</p>



<a name="205904185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205904185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205904185">(Aug 04 2020 at 13:13)</a>:</h4>
<p>it'd be good to write up the examples in a bit more detail <em>but</em></p>



<a name="205904209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205904209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205904209">(Aug 04 2020 at 13:13)</a>:</h4>
<p>there is probably a different way to formulate the rules to accept the program(s) I initially wanted to accept</p>



<a name="205904294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205904294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205904294">(Aug 04 2020 at 13:14)</a>:</h4>
<p>I think it'd be more like -- can we identify those cases where the subset relation has to hold <em>instantaneously</em> and just enforce them at a single point and not propagate them forward?</p>



<a name="205904324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205904324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205904324">(Aug 04 2020 at 13:14)</a>:</h4>
<p>but I also think maybe the best "immediate step" here is to take some notes and defer this until we've made progress in other areas</p>



<a name="205904887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205904887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205904887">(Aug 04 2020 at 13:19)</a>:</h4>
<p>we expected it to be incorrect :)</p>



<a name="205905013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905013">(Aug 04 2020 at 13:20)</a>:</h4>
<p>some notes/summary would be good for later</p>



<a name="205905122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905122">(Aug 04 2020 at 13:21)</a>:</h4>
<p>I can focus on it in the future if it's important, with more dedication than the quick hack job that it is</p>



<a name="205905424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905424">(Aug 04 2020 at 13:24)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116113">lqd</span> <a href="#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/equality.20variant.20vs.20polonius-as-is/near/205904887">said</a>:</p>
<blockquote>
<p>we expected it to be incorrect :)</p>
</blockquote>
<p>well, I mean that the <em>concept</em> is incorrect</p>



<a name="205905436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905436">(Aug 04 2020 at 13:24)</a>:</h4>
<p>you <em>can't</em> just propagate equality</p>



<a name="205905453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905453">(Aug 04 2020 at 13:24)</a>:</h4>
<p>I didn't quite expect that at least :)</p>



<a name="205905472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905472">(Aug 04 2020 at 13:24)</a>:</h4>
<p>I was thinking maybe it was an impl bug or something else</p>



<a name="205905474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905474">(Aug 04 2020 at 13:24)</a>:</h4>
<p>oh :)</p>



<a name="205905564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905564">(Aug 04 2020 at 13:25)</a>:</h4>
<p>me neither evidently, it's interesting/scary that such subtlety was only present in one or two tests</p>



<a name="205905590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905590">(Aug 04 2020 at 13:25)</a>:</h4>
<p>which reminds me, that maybe the other unexpected case may contain a different cause</p>



<a name="205905921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905921">(Aug 04 2020 at 13:28)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116113">lqd</span> <a href="#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/equality.20variant.20vs.20polonius-as-is/near/205905564">said</a>:</p>
<blockquote>
<p>me neither evidently, it's interesting/scary that such subtlety was only present in one or two tests</p>
</blockquote>
<p>yeah, I was thinking about that :)</p>



<a name="205905967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205905967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205905967">(Aug 04 2020 at 13:29)</a>:</h4>
<p>ok well let me post an update to the issue</p>



<a name="205906891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205906891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205906891">(Aug 04 2020 at 13:38)</a>:</h4>
<p>I forget, did we have an example that compiles with NLL but does not compile with polinius?</p>



<a name="205906893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205906893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205906893">(Aug 04 2020 at 13:38)</a>:</h4>
<p>I feel like we did</p>



<a name="205907174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907174">(Aug 04 2020 at 13:41)</a>:</h4>
<p>I found this motivating example on Zulip but I also think maybe it's wrong, though it could (maybe) be <em>made</em> correct</p>
<div class="codehilite"><pre><span></span><code><span class="w"> </span><span class="mi">13</span>:<span class="mi">42</span><span class="w"></span>

<span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">x</span>: <span class="kp">&amp;</span><span class="na">&#39;x</span><span class="w"> </span><span class="kt">u32</span><span class="p">;</span><span class="w"></span>
<span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">y</span>: <span class="kp">&amp;</span><span class="na">&#39;y</span><span class="w"> </span><span class="kt">u32</span><span class="p">;</span><span class="w"></span>

<span class="k">if</span><span class="w"> </span><span class="n">something</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"> </span><span class="c1">// creates `&#39;x: &#39;y` subset relation</span>
<span class="p">}</span><span class="w"></span>

<span class="k">if</span><span class="w"> </span><span class="n">something</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="n">z</span><span class="p">;</span><span class="w"> </span><span class="c1">// creates {L0} in &#39;x constraint</span>
<span class="w">  </span><span class="c1">// this point, we have `&#39;x: &#39;y` and `{L0} in `&#39;x`, so we also have `{L0} in &#39;y`</span>
<span class="w">  </span><span class="nb">drop</span><span class="p">(</span><span class="n">x</span><span class="p">);</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="n">z</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="c1">// polonius flags an (unnecessary) error</span>

<span class="nb">drop</span><span class="p">(</span><span class="n">y</span><span class="p">);</span><span class="w"></span>
</code></pre></div>


<p>wrong in the sense that I think polonius with just subset rules would accept it</p>



<a name="205907198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907198">(Aug 04 2020 at 13:41)</a>:</h4>
<p>in particular, I think <code>x = &amp;z</code> should make <code>'x</code> be <em>dead</em> on entry to that point, so we would drop the <code>'x: 'y</code> subset relation</p>



<a name="205907363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907363">(Aug 04 2020 at 13:43)</a>:</h4>
<p>I don't remember we had an example that compiled with NLLs and was rejected by polonius</p>



<a name="205907374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907374">(Aug 04 2020 at 13:43)</a>:</h4>
<p>oh I see that we already found that</p>



<a name="205907387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907387">(Aug 04 2020 at 13:43)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=52fbcbf0fdf3c55542476842053994a6">this was a revised version of the motivating example</a></p>



<a name="205907388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907388">(Aug 04 2020 at 13:43)</a>:</h4>
<p>ah right right</p>



<a name="205907407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907407">(Aug 04 2020 at 13:43)</a>:</h4>
<p>although it too <em>could</em> be resolved with a more precise version</p>



<a name="205907424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907424">(Aug 04 2020 at 13:43)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116113">lqd</span> <a href="#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/equality.20variant.20vs.20polonius-as-is/near/205907363">said</a>:</p>
<blockquote>
<p>I don't remember we had an example that compiled with NLLs and was rejected by polonius</p>
</blockquote>
<p>I could be wrong, for some reason I thought we did</p>



<a name="205907428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907428">(Aug 04 2020 at 13:43)</a>:</h4>
<p>the "polonius imprecision unnecessary error"</p>



<a name="205907432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907432">(Aug 04 2020 at 13:43)</a>:</h4>
<p>if we don't, that's good :)</p>



<a name="205907516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907516">(Aug 04 2020 at 13:44)</a>:</h4>
<p>I was basically wondering if there was <em>some extension</em> that would be required to make polonius not break any NLL code</p>



<a name="205907585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907585">(Aug 04 2020 at 13:44)</a>:</h4>
<p>I feel like NLL also rejected that</p>



<a name="205907656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907656">(Aug 04 2020 at 13:45)</a>:</h4>
<p>it appears it does reject it</p>



<a name="205907756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907756">(Aug 04 2020 at 13:46)</a>:</h4>
<p>yes, it does</p>



<a name="205907790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907790">(Aug 04 2020 at 13:46)</a>:</h4>
<p>at least crater would be our best bet to find such a case if it exists, compared to finding code that doesn't compile today and <em>shouldn't</em> compile with polonius either</p>



<a name="205907823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205907823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205907823">(Aug 04 2020 at 13:47)</a>:</h4>
<p>+1</p>



<a name="205908586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205908586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205908586">(Aug 04 2020 at 13:52)</a>:</h4>
<p>I would be curious to get <span class="user-mention" data-user-id="127262">@Aaron Weiss</span>'s take on the promoted-bounds example, though. MAybe I can draft up my even more troublesome variant of it.</p>



<a name="205908760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205908760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205908760">(Aug 04 2020 at 13:54)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=f836e6c86a68e41b5f2140efe298edfc">example</a></p>



<a name="205909042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909042">(Aug 04 2020 at 13:56)</a>:</h4>
<p>(we could publish a "puzzle of the day" of similar examples, like the sudoku cryptic, but for lifetimes :)</p>



<a name="205909403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909403">(Aug 04 2020 at 13:58)</a>:</h4>
<p>my writeup: <a href="https://github.com/rust-lang/polonius/issues/107#issuecomment-668612953">https://github.com/rust-lang/polonius/issues/107#issuecomment-668612953</a></p>



<a name="205909435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909435">(Aug 04 2020 at 13:59)</a>:</h4>
<p>It seems sort of obvious that this is broken now</p>



<a name="205909447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909447">(Aug 04 2020 at 13:59)</a>:</h4>
<p>but of course it wasn't before :)</p>



<a name="205909501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909501">(Aug 04 2020 at 13:59)</a>:</h4>
<p>not sure if I should just close the issue or what</p>



<a name="205909521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909521">(Aug 04 2020 at 13:59)</a>:</h4>
<p>I'll leave it for now, at least we settled that mystery</p>



<a name="205909636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909636">(Aug 04 2020 at 14:00)</a>:</h4>
<p>yeah let's keep it, it's food for thought for the future as there seems to be some real insight in there</p>



<a name="205909696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909696">(Aug 04 2020 at 14:01)</a>:</h4>
<p>(on the topic of "exactly one example that showed the problem", I am interested in how we could try to prove polonius correct... but one thing at a time, and it seems like <span class="user-mention" data-user-id="127262">@Aaron Weiss</span> and <span class="user-mention" data-user-id="116852">@Andrea Lattuada</span> are kind of doing work paving that route)</p>



<a name="205909717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909717">(Aug 04 2020 at 14:01)</a>:</h4>
<p>/me curious about dafny</p>



<a name="205909899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909899">(Aug 04 2020 at 14:02)</a>:</h4>
<p>maybe we need an F* to rust extractor like "rusty kremlin" (IIRC oxide is in F*?)</p>



<a name="205909988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205909988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205909988">(Aug 04 2020 at 14:03)</a>:</h4>
<p>(maybe kremlin would work as is heh)</p>



<a name="205939257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/equality%20variant%20vs%20polonius-as-is/near/205939257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/equality.20variant.20vs.20polonius-as-is.html#205939257">(Aug 04 2020 at 18:03)</a>:</h4>
<p>I've finished reading the writeup and it's great, super clear, thanks a bunch</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>